<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<%--<div class="btn-rigth">--%>
<%--<button type="button" id="addTemplate" onclick="addTemplate('3','${creator}','${billingDept}','${clinicRecord.clinicId}','${clinicRecord.patientId}')" class="btn btn-info">插入模板</button>--%>
<%--<button type="button" id="historyRecord" onclick="historyRecord('${clinicRecord.patientId}','${clinicRecord.clinicId}')" class="btn btn-info">历史病历</button>--%>
<%--<button type="button" id="saveBtn" class="btn btn-primary">保存</button>--%>
<%--<button type="button" onclick="clinicPrint('${clinicRecord.id}')" class="btn btn-primary">打印</button>--%>
<%--</div>--%>


<form id="inputForm1" data-parsley-validate="" modelAttribute="hisDiagnosis" method="post"
      class="form-horizontal">
    <input type="hidden" name="id" value="${clinicItemRecord.id}">

    <div id="zhusuIdDiv">
        <div class="complaint">
            <div>主诉</div>
        </div>
        <input name="zhusu" type="hidden"  value="${clinicItemRecord.zhusu}">

        <div class="complaint-input" id="zhusuId" contenteditable="true" name="div" submit_id="zhusuId">
            ${clinicItemRecord.zhusu}
        </div>
        <div>
            <div class="col-sm-12" id="tableDiv">
                <table id="contentTable" class="table table-bordered mg-t datatable">
                    <thead>
                    <tr bgcolor="#eaecf6">
                        <th width="10%">诊断类型</th>
                        <th>诊断名称</th>
                        <th>诊断时间</th>
                        <th>诊断医生</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${hisDiagnosisList}" var="hisDiagnosis">
                        <tr>
                            <td>${fns:getDictLabels(hisDiagnosis.type,'DIAGNOSIS' ,'' )}</td>
                            <td>${hisDiagnosis.icdName}</td>
                            <td><fmt:formatDate value="${hisDiagnosis.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                            <td>${hisDiagnosis.diagnosisDoctor}</td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
            <div class="complaint">
                <div>现病史</div>
            </div>
            <input name="xianbingshi" type="hidden"  value="${clinicItemRecord.xianbingshi}">

            <div class="complaint-input" id="xianbingshiId" contenteditable="true" name="div" submit_id="xianbingshiId">
                ${clinicItemRecord.xianbingshi}
            </div>
            <div class="complaint">
                <div>个人史</div>
            </div>
            <input name="gerenshi" type="hidden"  value="${clinicItemRecord.gerenshi}">

            <div class="complaint-input" contenteditable="true" id="gerenshiId" name="div" submit_id="gerenshiId">
                ${clinicItemRecord.gerenshi}
            </div>
            <div class="complaint">
                <div>既往史</div>
            </div>
            <input name="jiwangshi" type="hidden" value="${clinicItemRecord.jiwangshi}">

            <div class="complaint-input" contenteditable="true"  id="jiwangshiId"  name="div" submit_id="jiwangshiId">
                ${clinicItemRecord.jiwangshi}
            </div>
            <div class="complaint">
                <div>婚育史</div>
            </div>
            <input name="hunyushi"  type="hidden" value="${clinicItemRecord.hunyushi}">

            <div class="complaint-input" contenteditable="true" id="hunyushiId" name="div" submit_id="hunyushiId">
                ${clinicItemRecord.hunyushi}
            </div>
            <div class="complaint">
                <div>家族史</div>
            </div>
            <input name="jiazushi"  type="hidden" value="${clinicItemRecord.jiazushi}"
                   class="clinicInput">

            <div class="complaint-input" contenteditable="true" id="jiazushiId" name="div" submit_id="jiazushiId">
                ${clinicItemRecord.jiazushi}
            </div>
        </div>

        <div class="col-sm-12 complaint-examine" id="examineDivId" style="padding: 0px">
            <div class="complaint-check">
                <div>检查检验</div>
            </div>
            <div class="animal">T: <input data-parsley-twonum="1" type="text" name="tiwen"
                                          value="${clinicItemRecord.tiwen}" class="form-input"> °C
            </div>
            <div class="animal">B: <input data-parsley-twonum="1" type="text" name="maibo"
                                          value="${clinicItemRecord.maibo}" class="form-input"> 次/分
            </div>
            <div class="animal">R: <input type="text" name="huxi" value="${clinicItemRecord.huxi}" class="form-input">
                次/分
            </div>
            <div class="animal"> BP: <input type="text" name="xueya" value="${clinicItemRecord.xueya}"
                                            class="form-input"> mmHg
            </div>
            <div class="complaint">
                <div>体格检查</div>
            </div>
            <input name="tigejiancha" type="hidden" value="${clinicItemRecord.tigejiancha}">

            <div class="complaint-input" contenteditable="true" id="tigejianchaId"  name="div" submit_id="tigejianchaId">
                ${clinicItemRecord.tigejiancha}
            </div>
            <div class="complaint">
                <div>专科情况</div>
            </div>
            <input name="xiaojiefenxi" type="hidden"  value="${clinicItemRecord.xiaojiefenxi}">

            <div class="complaint-input" contenteditable="true" id="xiaojiefenxiId" name="div" submit_id="xiaojiefenxiId">
                ${clinicItemRecord.xiaojiefenxi}
            </div>
            <div class="complaint">
                <div>辅助检查</div>
            </div>
            <input name="fuzhujiancha" type="hidden"value="${clinicItemRecord.fuzhujiancha}">

            <div class="complaint-input" contenteditable="true"  id="fuzhujianchaId"  name="div" submit_id="fuzhujianchaId">
                ${clinicItemRecord.fuzhujiancha}
            </div>
        </div>
    </div>
    </section>
</form>

</div>
</div>


<script>
    a();
    function a() {
        var divId = document.getElementsByName("div");
        for(var i=0;i<divId.length;i++){
            var id = divId[i].getAttribute("id");
           var DivId = document.getElementById(id);
            DivId.innerHTML = unescape(DivId.innerHTML);
        }
    }
</script>